authselect select sssd --force

echo "sudoers:    files sss" >> /etc/nsswitch.conf

echo "session optional pam_oddjob_mkhomedir.so skel=/etc/skel/ umask=0022" >> /etc/pam.d/system-auth
systemctl enable --now oddjobd

chown -R root: /etc/sssd
chmod 600 -R /etc/sssd
systemctl enable --now sssd
systemctl restart  sssd
